﻿using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;

public partial class test_post : System.Web.UI.Page
{
    public string strData = "";
    protected void Page_Load(object sender, EventArgs e)
    {
        System.Text.StringBuilder sb = new System.Text.StringBuilder();
        sb.Append("<?xml version=\"1.0\" encoding=\"UTF-8\"?><!--*号为必填项-->");
        sb.Append("<HouseInfo><PropertyID>myftest20100224</PropertyID><!--*贵公司房源primary key-->");
        sb.Append("<Username>myf</ Username><!--*房友在线用户id-->");
        sb.Append("<TradeType>出售</TradeType><!--*交易类型(出售，出租，租售)-->");
        sb.Append("<SalePrice>2800000</SalePrice><!-- *出售价格(数字）单位：元-->");
        sb.Append("<RentPrice>9000</RentPrice><!-- *（出租必填）出租价格(数字）单位：元/月-->");
        sb.Append("<UsableArea></UsableArea><!-- 使用面积(数字)-->");
	    sb.Append("</HouseInfo>");

        strData = sb.ToString();

        System.Net.WebClient wc = new System.Net.WebClient();
        //wc.BaseAddress = ;
        string str = wc.UploadString("http://data.fangyou.com/apichenxin/upload?client_citycode=sh", "post", strData);
        Console.WriteLine(str);

    }
}
